package test;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;

import readySiteScanners.IRR;
import searchEngine.*;
import AgentsDB.*;

public class test {
	/**
	 * @param args
	 */
	public static void main(String [ ] args)
	{
		System.out.println(new Date());
	
	}
	static void testRead(){
		Set<Agent> agents;
		try {
			agents = AgentDataIO.readAgents("d:\\ivan\\workspace\\SearchEngine\\WebContent\\agents.data",",");
			Iterator<Agent> iterator = agents.iterator();
			
			while (iterator.hasNext()){
		
				Agent a =  (Agent)iterator.next();
				System.out.println(a.getPhoneNumber());
			}
		
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	static void testWrite() throws ParseException, IOException{
		Set<Agent> agents = new HashSet<Agent>();
		
		 SimpleDateFormat df = new SimpleDateFormat("EEE MMM dd HH:mm:ss ZZZ yyyy");
			
		 Date date = (Date) df.parse("Tue Sep 06 12:00:10 UTC 2011");
		agents.add(new Agent((long)447999996, "test", date, "test.by"));
		AgentDataIO.writeAgents(agents, "d:\\ivan\\workspace\\SearchEngine\\WebContent\\agents.data",",");
	}
}
